<template>
  <view class="content pt-50">
    <u-grid :border="false">
      <!-- <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/checkTaskList')">
        <u-icon name="list-dot" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">排查任务执行</text>
      </u-grid-item> -->
      <!-- <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/dangerCreate')">
        <u-icon name="file-text" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">隐患登记</text>
      </u-grid-item> -->
      <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/checkList')">
        <u-icon name="arrow-downward" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">隐患处理</text>
      </u-grid-item>
      <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/dangerEditList')">
        <u-icon name="edit-pen" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">隐患整改</text>
      </u-grid-item>
      <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/dangerConfirmList')">
        <u-icon name="account" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">隐患验收</text>
      </u-grid-item>
      <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/editDelayList')">
        <u-icon name="pushpin" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">延期审批</text>
      </u-grid-item>
      <u-grid-item :customStyle="{padding: '30rpx 0'}" @click="routeByUrl('/pagesDanger/dangerList')">
        <u-icon name="order" size="36" color="#3F99F7"></u-icon>
        <text class="item-title">隐患清单</text>
      </u-grid-item>
    </u-grid>
  </view>
</template>

<script>
  import { getUserInfoApi } from '@/apis/auth/index.js'
  import { setUserInfo } from '@/utils/auth.js'
  
  export default {
    onShow() {
      this.getUserInfo()
    },
    methods: {
      getUserInfo: function() {
        getUserInfoApi().then(res => {
          setUserInfo(res)
        }).catch(err => console.warn(err))
      },
      routeByUrl: function(url) {
        uni.navigateTo({ url })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .content {
    .item-title {
      font-size: 28rpx;
      line-height: 40rpx;
      color: #333333;
    }
  }
</style>
